<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="demo">
        <!-- v-for遍历对象 -->
        <h2>汽车数据(v-for遍历对象)</h2>
        <ul>
            <li v-for='(value,key,index) in car'>
                {{value}}-{{key}}-{{index}}
                <!-- 值-键-顺序下标 -->
            </li>
        </ul>
        <hr>
        <!-- v-for遍历字符串 -->
        <h2>v-for遍历字符串</h2>
        <ul>
            <li v-for='(value,index) in msg'>
                {{value}}-{{index}}
                <!-- 值-下标 -->
            </li>
        </ul>
        <hr>
        <!-- v-for遍历次数 -->
        <ul>
            <li v-for='(value,index) in 10'>
                {{value}}-{{index}}
                <!-- 从1开始到10的数字-下标 -->
            </li>
        </ul>
    </div>
    <script>
        Vue.config.productionTip = false;

        new Vue({
			el:'#demo',
			data:{
				car:{
					name:'迈腾',
					price:'20W'
				},
				msg:'hello,atguigu'
			}
		})
    </script>
</body>

</html>